﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using Xiucai.Common;
using Xiucai.Common.Data;
using Xiucai.Common.Data.SqlServer;
using Xiucai.Common.Provider;
using Xiucai.BPM.Core.Model;

namespace Xiucai.BPM.Core.Dal
{
    public class AreaDal : BaseRepository<Area>
    {
        public static AreaDal Instance
        {
            get { return SingletonProvider<AreaDal>.Instance; }
        }
        public IEnumerable<Area> GetChildren(int parentid = 0)
        {
            return GetAll().Where(d => d.PARENT_ID == parentid);
        }
    }
}
